#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct Product{
  int id;
  char name[50];
  struct Product *next;
}Product; 

int main(){
  /* Product prod; */
  /* prod.id = 1001; */
  /* strcpy(prod.name , "admin"); */
  /* printf("name:%s",prod.name); */
  
  
  Product *prod = malloc (sizeof(Product));
  prod->id=1001;
  strcpy (prod->name, "a");
  Product *next = malloc (sizeof(Product));
  prod->next=next;
  
  next->id=1002;
  strcpy(next->name,"b");
  next->next=NULL;
  
  while(prod){
    printf("id=%d,name=%s\n",prod->id,prod->name);
    prod = prod->next;
  }
  return 0;
}
